#ifndef MODELING_H
#define MODELING_H

#include <vector>
#include <set>

#include "primitive.h"
#include "scene.h"

class Modeling{
    protected:
        Scene *scene;

        map<int, Object> objects;

        vector<int> selectedVertices;
        vector<int> selectedEdges;
        vector<int> selectedFaces;

    public:
        ObjectFactory factory;
    
    public:
        Modeling(Scene *_scene);
        ~Modeling();

        void addFace(Face face, int objectId);        
        
        void addObject(Object obj);
        map<int, Object> &getObjects();

        Scene* getScene();

        int isSelectedVertex(int objId, int elemId);
        void selectVertex(int objId, int elemId);
        
        int isSelectedEdge(int objId, int elemId);
        void selectEdge(int objId, int elemId);
        
        int isSelectedFace(int objId, int elemId);
        Face& selectFace(int objId, int elemId);

        void createPrism(unsigned int objectId, unsigned int faceId, Point generatrix);
        void createPyramid(unsigned int objectId, unsigned int faceId, Point generatrix);

        void updateScene();
        
        //TODO: excluir
        void show();
        void testPrisma();
};

#endif /* MODELING_H */
